

class GMArticleModel {
  String? retCode;
  String? retDesc;
  List<GMArticleData>? data;

  GMArticleModel({this.retCode, this.retDesc, this.data});

  GMArticleModel.fromJson(Map<String, dynamic> json) {
    retCode = json['retCode'];
    retDesc = json['retDesc'];
    if (json['data'] != null) {
      data = <GMArticleData>[];
      json['data'].forEach((v) {
        data!.add(GMArticleData.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['retCode'] = retCode;
    data['retDesc'] = retDesc;
    if (this.data != null) {
      data['data'] = this.data!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class GMArticleData {
  String? group;
  List<GMArticleList>? list;

  GMArticleData({this.group, this.list});

  GMArticleData.fromJson(Map<String, dynamic> json) {
    group = json['group'];
    if (json['list'] != null) {
      list = <GMArticleList>[];
      json['list'].forEach((v) {
        list!.add(GMArticleList.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['group'] = group;
    if (list != null) {
      data['list'] = list!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}


class GMArticleDetailModel {
  String? retCode;
  String? retDesc;
  GMArticleList? data;

  GMArticleDetailModel({this.retCode, this.retDesc, this.data});

  GMArticleDetailModel.fromJson(Map<String, dynamic> json) {
    retCode = json['retCode'];
    retDesc = json['retDesc'];
    data = json['data'] != null ? new GMArticleList.fromJson(json['data']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['retCode'] = this.retCode;
    data['retDesc'] = this.retDesc;
    if (this.data != null) {
      data['data'] = this.data!.toJson();
    }
    return data;
  }
}

class GMArticleList {
  String? articleId;
  String? author;
  String? avatarUrl;
  int? commentCount;
  String? content;
  String? coverImage;
  String? createDate;
  int? height;
  int? praiseCount;
  String? sourceUrl;
  String? summary;
  String? title;
  String? type;
  String? userId;
  String? userName;
  String? vipLevelCode;
  int? visitCount;
  int? width;

  GMArticleList(
      {this.articleId,
      this.author,
      this.avatarUrl,
      this.commentCount,
      this.content,
      this.coverImage,
      this.createDate,
      this.height,
      this.praiseCount,
      this.sourceUrl,
      this.summary,
      this.title,
      this.type,
      this.userId,
      this.userName,
      this.vipLevelCode,
      this.visitCount,
      this.width});

  GMArticleList.fromJson(Map<String, dynamic> json) {
    articleId = json['articleId'];
    author = json['author'];
    avatarUrl = json['avatarUrl'];
    commentCount = json['commentCount'];
    content = json['content'];
    coverImage = json['coverImage'];
    createDate = json['createDate'];
    height = json['height'];
    praiseCount = json['praiseCount'];
    sourceUrl = json['sourceUrl'];
    summary = json['summary'];
    title = json['title'];
    type = json['type'];
    userId = json['userId'];
    userName = json['userName'];
    vipLevelCode = json['vipLevelCode'];
    visitCount = json['visitCount'];
    width = json['width'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['articleId'] = this.articleId;
    data['author'] = this.author;
    data['avatarUrl'] = this.avatarUrl;
    data['commentCount'] = this.commentCount;
    data['content'] = this.content;
    data['coverImage'] = this.coverImage;
    data['createDate'] = this.createDate;
    data['height'] = this.height;
    data['praiseCount'] = this.praiseCount;
    data['sourceUrl'] = this.sourceUrl;
    data['summary'] = this.summary;
    data['title'] = this.title;
    data['type'] = this.type;
    data['userId'] = this.userId;
    data['userName'] = this.userName;
    data['vipLevelCode'] = this.vipLevelCode;
    data['visitCount'] = this.visitCount;
    data['width'] = this.width;
    return data;
  }
}
